#region Using directives

using System;
using System.Collections.Generic;
using System.Text;

#endregion

namespace Weazel.Gezel.Simulator.Reference
{
  /// <summary>
  /// The $cycle directive is contained in a $display directive 
  /// and just outputs the current simulation cycle to the console
  /// </summary>
  class CycleDisplay : AbstractDisplay
  {
    /// <summary>
    /// Simply outputs the current simulation cycle
    /// number to the output stream
    /// </summary>
    /// <param name="g">simulation cycle</param>
    /// <param name="buffer">output buffer</param>
    public override void Show(long g, StringBuilder buffer)
    {
      // subtracts one to get current cycle number
      buffer.Append(g - 1);
    }
  }
}
